<template>
 <div>
   <a-row :gutter="20">

     <a-col :span="8">
       <a-form-item label='子供应商' v-bind="formItemLayout">
         <a-input v-model="mabFile.mab02"  style="width: 100%"/>
         <div v-if="!mabFile.mab02" style="color: #f5222d;line-height: 1.524;margin-top: -2px;clear: both;">子供应商不能为空</div>
       </a-form-item>
     </a-col>
     <a-col :span="8">
       <a-form-item label='子供应商型号' v-bind="formItemLayout">
         <a-input v-model="mabFile.mab03" style="width: 100%"/>
       </a-form-item>
     </a-col>
     <a-col :span="8">
       <a-form-item label='名称' v-bind="formItemLayout">
         <a-input v-model="mabFile.name" style="width: 100%"/>
       </a-form-item>
     </a-col>
   </a-row>

   <a-row :gutter="24">
     <a-col :span="8">
       <a-form-item label="颜色" v-bind="formItemLayout">
         <a-input v-model="mabFile.mab05" style="width: 100%"></a-input>
       </a-form-item>
     </a-col>
     <a-col :span="8">
       <a-form-item label='尺码' v-bind="formItemLayout">
         <a-input v-model="mabFile.mab06" style="width: 100%"/>
       </a-form-item>
     </a-col>
     <a-col :span="8">
       <a-form-item label='净重' v-bind="formItemLayout">
         <a-input-number :min="1" type="number" v-model="mabFile.mab09" style="width: 100%"/>
       </a-form-item>
     </a-col>
   </a-row>

   <a-row :gutter="24">
     <a-col :span="8">
       <a-form-item label='颜色英文' v-bind="formItemLayout">
         <a-input v-model="mabFile.mab07" style="width: 100%"/>
       </a-form-item>
     </a-col>
     <a-col :span="8">
       <a-form-item label="尺码英文" v-bind="formItemLayout">
         <a-input v-model="mabFile.mab08" style="width: 100%"></a-input>
       </a-form-item>
     </a-col>
     <a-col :span="8">
       <a-form-item label='毛重' v-bind="formItemLayout">
         <a-input-number :min="1" type="number" v-model="mabFile.mab10" style="width: 100%"/>
       </a-form-item>
     </a-col>
   </a-row>

   <a-row :gutter="24">
     <a-col :span="8">
       <a-form-item label="进价" v-bind="formItemLayout">
         <a-input-number :min="1" type="number" v-model="mabFile.mab11" style="width: 100%"/>
       </a-form-item>
     </a-col>
     <a-col :span="8">
       <a-form-item label='售价' v-bind="formItemLayout">
         <a-input-number :min="1" type="number" v-model="mabFile.mab13" style="width: 100%"/>
       </a-form-item>
     </a-col>
     <a-col :span="8">
       <a-form-item label='商品条码' v-bind="formItemLayout">
         <a-input v-model="mabFile.mab15" style="width: 100%"/>
       </a-form-item>
     </a-col>
   </a-row>

   <a-row :gutter="24">
     <a-col :span="8">
       <a-form-item label='进价(含税)' v-bind="formItemLayout">
         <a-input-number :min="1" type="number" v-model="mabFile.mab12" style="width: 100%"/>
       </a-form-item>
     </a-col>
     <a-col :span="8">
       <a-form-item label="售价(含税)" v-bind="formItemLayout">
         <a-input-number :min="1" type="number" v-model="mabFile.mab14" style="width: 100%"/>
       </a-form-item>
     </a-col>

     <a-col :span="8">
       <a-form-item label='体积' v-bind="formItemLayout">
         <a-input-number :min="1" type="number" v-model="mabFile.mab16" style="width: 100%"/>
       </a-form-item>
     </a-col>
   </a-row>

   <a-row :gutter="24">
     <a-col :span="8">
       <a-form-item label="长" v-bind="formItemLayout">
         <a-input-number :min="1" type="number" v-model="mabFile.mab17" style="width: 100%"/>
       </a-form-item>
     </a-col>
     <a-col :span="8">
       <a-form-item label='宽' v-bind="formItemLayout">
         <a-input-number :min="1" type="number" v-model="mabFile.mab18" style="width: 100%"/>
       </a-form-item>
     </a-col>
     <a-col :span="8">
       <a-form-item label='高' v-bind="formItemLayout">
         <a-input-number :min="1" type="number" v-model="mabFile.mab19" style="width: 100%"/>
       </a-form-item>
     </a-col>
   </a-row>
   <a-row :gutter="24">
     <a-col :span="8">
       <a-form-item label='产品状态' v-bind="formItemLayout">
         <a-select defaultValue="Y" v-model="mabFile.mabacti" style="width: 100%">
           <a-select-option value="Y">上架</a-select-option>
           <a-select-option value="N">下架</a-select-option>
         </a-select>
       </a-form-item>
     </a-col>
   </a-row>
 </div>
</template>

<script>
const formItemLayout = {
  labelCol: {span: 6},
  wrapperCol: {span: 18}
}
export default {
  name: 'News',
  components: {},
  data () {
    return {
      formItemLayout,
      selectedOptions: [],
      mabFile: this.mab || {}
    }
  },
  props: ['mab'],
  created () {
    this.mabFile.mab01 = this.$route.query.mab01
  },
  watch: {
    'mab' (val) {
      this.mabFile = val
    },
    'mabFile' (val) {
      this.$emit('update:mab', val)
    }
  }
}
</script>

<style lang="less" scoped>

</style>
